package org.kinglone.back.system.service;

import org.kinglone.back.comment.model.Comment;
import org.kinglone.back.system.model.SystemParam;
import org.kinglone.common.dao.impl.BaseDaoImpl;
import org.kinglone.common.util.PageQuery;
import org.kinglone.common.util.PageResults;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("systemParamService")
@Transactional(readOnly=false)
public class SystemParamServiceImpl extends BaseDaoImpl<SystemParam> implements SystemParamService{

	@Override
	public PageResults<SystemParam> findSystemParamByPage(PageQuery pageQuery) {
		String hql ="from SystemParam s order by s.operationTime desc";
		
		String countHql="select count(0) from SystemParam";
		
		PageResults<SystemParam> pageResults =  super.findPageByFetchedHql(hql, countHql, pageQuery, null);
		return pageResults;
	}

}
